Skip to content

Conversation

Copy link

Copilot AI commented Jan 26, 2026

ItemBrowser lacked filtering capabilities, making it difficult to locate specific item types in large WAD files. Added a filter button that enables multi-select category filtering based on metadata in catalog XMLs.

Changes

Core Infrastructure

  • Extended TrCatalog to parse and expose category attribute from XML catalogs
  • Added GetMoveableCategory(), GetStaticCategory(), GetAllMoveableCategories(), GetAllStaticCategories()

Catalog Data

  • Populated 1,631 items with category attributes across TombEngine and TR4 catalogs
  • Categories: PLAYER, VEHICLE, ENEMY, CREATURE, BOSS, NPC, PROJECTILE, TRAP, PICKUP, EMITTER, PUZZLE, DOOR, SWITCH, DECORATION, MECHANISM, ARCHITECTURE, SHATTER

UI & Filtering

  • Added filter button between search combo and add button
  • Context menu with checkable category list, "Statics Only", and "Clear Filter" options
  • Multi-select filtering with OR logic (item shown if matches any selected category)
  • Preserves item selection when possible after filter changes

Example

<!-- Moveables.xml -->
<moveable id="130" name="HUSKIE" category="ENEMY"/>
<moveable id="255" name="SKELETON" category="ENEMY"/>

<!-- Statics.xml -->
<static id="0" name="PLANT0" category="DECORATION"/>

Filter menu dynamically populates from available categories in current game version. Backward compatible with XMLs lacking category attributes.

Original prompt

Currently the ItemBrowser tool window has no filter button. Can we add a filter button that filters the items in comboItems next to it? The filter button when pressed should open up a menu that has all the categories listed. Along with a clear filter option.

The filters should be read from Moveables.xml & Statics.xmls category field and populated dynamically.
We should also add a filter for statics only.

Be sure not to break anything logic wise, items ID etc.

For e.g.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 26, 2026 19:33
Added category attributes to all 941 moveables in the TombEngine catalog with appropriate categorization:
- PLAYER (13): Lara and her components
- VEHICLE (13): Vehicles and their animations
- ENEMY (111): Hostile enemies and dangerous creatures
- CREATURE (13): Non-hostile animals
- BOSS (20): Boss enemies
- NPC (9): Non-player characters
- PROJECTILE (13): Projectiles and weapons
- TRAP (67): Traps and obstacles
- PICKUP (86): Pickupable items (weapons, ammo, health)
- EMITTER (7): Particle emitters
- PUZZLE (188): Puzzle items, keys, and related objects
- DOOR (51): All door types
- SWITCH (36): Switches and levers
- DECORATION (208): Decorative and visual objects
- MECHANISM (62): Mechanisms and machinery

AI objects and internal markers intentionally left without categories.

Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
- Added category attributes to all 520 moveables in TR4/Moveables.xml
- Added category attributes to all 160 statics in TR4/Statics.xml
- Used TombEngine categorization logic for consistency
- Categories: PLAYER, VEHICLE, ENEMY, CREATURE, BOSS, NPC, PROJECTILE, TRAP, PICKUP, EMITTER, PUZZLE, DOOR, SWITCH, DECORATION, MECHANISM, ARCHITECTURE, SHATTER
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Copilot AI changed the title [WIP] Add filter button to ItemBrowser tool window Add category-based filtering to ItemBrowser Jan 26, 2026
Copilot AI requested a review from TrainWrack January 26, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants